package cn.sofwin.day0106;

import java.util.Scanner;

public class Test04 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String vip;
        double cos,pay=0.0;

        System.out.println("请输入是否为会员：是（y）/否（其它字符）");
        vip = sc.next();
        System.out.println("请输入购物金额：");
        cos = sc.nextDouble();

        if(vip.equals("y")){
            if(cos >= 200){
                pay = cos*0.75;
            }else{
                pay = cos*0.8;
            }
        }else {
            if(cos >=100){
                pay = cos*0.9;
            }
        }

        System.out.println("实际支付：" + pay);
    }
}
